/* 移动端排行榜样式 */

.page-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding-top: 0;
    padding-bottom: 80px;
}

/* 顶部横幅 */
.top-banner {
    text-align: center;
    padding: 30px 20px;
    color: white;
}

.banner-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.banner-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.banner-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.filter-tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tab:active {
    transform: scale(0.98);
}

.filter-tab.active {
    background: white;
    color: var(--primary-color);
}

/* 前三名 - 改为列表形式 */
.top-three {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

/* 排行榜列表 - 统一样式 */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0; /* 移除间距，使用border分隔 */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.leader-item {
    background: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.leader-item:last-child {
    border-bottom: none;
}

.leader-item:active {
    background: var(--bg-secondary);
}

/* 前三名高亮 */
.leader-item.top-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), rgba(255, 255, 255, 0));
}

.leader-item.top-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), rgba(255, 255, 255, 0));
}

.leader-item.top-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), rgba(255, 255, 255, 0));
}

.leader-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

/* 前三名徽章样式 */
.leader-rank.rank-1 {
    color: #FFD700;
    font-size: 24px;
}

.leader-rank.rank-2 {
    color: #C0C0C0;
    font-size: 22px;
}

.leader-rank.rank-3 {
    color: #CD7F32;
    font-size: 20px;
}

.leader-rank.rank-normal {
    color: var(--text-secondary);
}

.leader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.leader-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leader-info {
    flex: 1;
    min-width: 0;
}

.leader-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leader-stats {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
}

.leader-score {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* 加载和空状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: 40px;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-text {
    font-size: 16px;
    margin-bottom: 24px;
}

/* 我的排名卡片 */
.my-rank-card {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.my-rank-title {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.my-rank-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.my-rank-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.my-rank-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.my-rank-stat {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.my-rank-stat strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 375px) {
    .banner-icon {
        font-size: 56px;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    .top-item {
        padding: 16px 8px;
    }
    
    .top-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .top-item.rank-1 .top-avatar {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

/* 安全区域适配 */
@supports (padding: max(0px)) {
    .top-banner {
        padding-top: max(30px, calc(env(safe-area-inset-top) + 30px));
    }
}

